package com.miku.blog.eume;

/**
 * @author shkstart
 * @create ${}YEAR-05-24 23:09
 */
public enum HttpStatusEnum {

    OK(200,"操作成功"),
    EMAIL_SEND_SUCCESS(200,"验证码已发送,请及时查看"),
    UNAUTHORIZED(401,"认证失败"),
    FORBIDDEN(403,"权限不足"),

    SYSTEM_ERROR(500,"系统异常"),
    PARAM_ERROR(500,"参数异常"),
    DATA_EXCEPTIONS(500,"数据异常"),

    UPLOAD_FILE_TYPE_ERROR(500,"文件上传失败,图像文件只支持JPG/JPEG/PNG格式"),
    UPLOAD_FILE_ERROR(500,"文件上传失败,请稍后重试或联系管理员"),
    FILE_DELETE_ERROR(500,"文件上传失败,请稍后重试或联系管理员"),

    UPDATE_DATA_ERROR(500,"数据更新失败,请稍后重试或联系管理员"),
    INSERT_DATA_ERROR(500,"数据添加失败,请稍后重试或联系管理员"),
    REMOVE_DATA_ERROR(500,"数据删除失败,请稍后重试或联系管理员"),

    DELETE_ROLE_ERROR(500,"角色删除失败,当前角色存在用户"),
    UPDATE_ROLE_ERROR(500,"角色更新失败,每位用户只能匹配一个角色"),

    INSERT_TAG_ERROR(500,"标签添加失败,已存在同名标签"),
    DELETE_TAG_ERROR(500,"标签删除失败,所要删除的标签存在文章"),

    INSERT_CATEGORY_ERROR(500,"分类添加失败,已存在同名分类"),
    DELETE_CATEGORY_ERROR(500,"分类删除失败,所要删除的分类存在文章"),


    ACCOUNT_DOES_NOT_EXIST(500,"此账号不存在"),
    USER_ALREADY_EXISTS(500,"该邮箱已存在用户"),
    DO_NOT_BIND_THE_SAME_MAILBOX(500,"当前账号已绑定此邮箱,请勿重复操作"),
    THE_MAILBOX_IS_MALFORMED(500,"邮箱格式错误"),
    MAILBOX_AUTHENTICATION_FAILED(500,"邮箱验证失败"),
    SEND_EMAIL_ERROR(500,"验证码发送失败,请检查邮箱是否输入正确或联系管理员"),
    EMAIL_CODE_ERROR(500,"验证码错误"),
    EMAIL_CODE_EXPIRED(500,"验证码已过期,请重新获取"),

    NICKNAME_IS_ALREADY_EXIST(500,"该昵称已被占用"),

    ICON_TYPE_ERROR(500,"图标格式错误,请务必根据图标下拉菜单进行选择"),

//    MENU_SAVE_ERROR_BY_ORDERNUM(500,"保存失败,当前菜单下已存在对应的显示排序大小"),

    PASSWORD_LENGTH_ERROR(500," 更新失败,密码长度至少6位"),
    PASSWORD_ERROR(500," 更新失败,原密码错误"),
    NEW_PASSWORD_ERROR(500,"保存失败,新密码与确认密码不一致"),
    NEW_PASSWORD_DOES_NOT_MATCH_THE_OLD(500,"保存失败,新密码与旧密码不能一致"),

    DONOT_LOGIN_REPEATEDLY(500,"已处于登录状态,请勿重复登录操作"),

    PLEASE_LOGIN_FIRST(603,"请先登录后再进行操作"),
    LOGIN_USERNAME_NOTEXISTS(604,"登陆失败,用户名不存在"),
    LOGIN_PASSWORD_ERROR(604,"登陆失败,密码错误"),
    NEED_LOGIN_AGAIN(605,"登陆状态已过期,请重新登录"),
    LOGIN_ANOMALY(606,"登录状态异常,请重新登录"),
    TOKEN_UNLAWFUL(700,"非法操作"),

    USER_IS_DISABLE(801,"当前账号已被禁用"),
    ADMIN_FORBIDDEN(803,"权限不足,拒绝访问");

    private Integer code;
    private String msg;
    HttpStatusEnum(Integer code,String msg){
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode(){
        return code;
    }

    public String getMsg(){
        return msg;
    }

}
